package com.zzw.directbuffer;

import sun.nio.ch.DirectBuffer;

import java.nio.ByteBuffer;

public class DirectBufferTest {

    public static void main(String[] args) throws InterruptedException {
        System.out.println("Hello World!");
        ByteBuffer buf = ByteBuffer.allocateDirect(1024 * 1024 * 128);
        Thread.sleep(10000);
        ((DirectBuffer)buf).cleaner().clean();
        Thread.sleep(10000);
    }

}
